import React, { useRef, useState, useEffect } from 'react';
import { connect, history } from 'umi';
import { Row, Col, Card, Tooltip, Button, Space, Modal, notification } from 'antd';
import TableDataBlock from '@/components/TableDataBlock';
const AnsweringSelected = (props) => {
    const { loading, dispatch, list, departmentList, teamList } = props;
    const childRef = useRef();
    const searchItems = [
        {
            label: '客户姓名或手机',
            name: 'keyword',
        },
        {
            label: '标签',
            name: 'tags',
        },

    ];
    const getColumns = [
        {
            title: '学科',
            dataIndex: 'codeName',
        },
        {
            title: '问题类型',
            dataIndex: 'codeName',
        },
        {
            title: '知识点',
            dataIndex: 'codeName',
        },
        {
            title: '问题描述',
            dataIndex: 'codeName',
        },
        {
            title: '是否高频',
            dataIndex: 'codeName',
        },
        {
            title: '查看次数',
            dataIndex: 'codeName',
        },
        {
            title: '点赞次数',
            dataIndex: 'codeName',
        },
        {
            title: '评论数',
            dataIndex: 'codeName',
        },
        {
            title: '收藏数',
            dataIndex: 'codeName',
        },
        {
            type: 'handle',
            width: 200,
            dataIndex: 'id',
            render: (val, record) => [
                {
                    auth: true,
                    title: '取消精选',
                    click: () => {

                    },
                },

            ],
        },
    ];
    return <Card title={'精选答疑'}>
        <TableDataBlock
            searchItems={searchItems}
            cRef={childRef}
            loading={loading}
            columns={getColumns}
            rowKey={(e) => {
                return e.id
            }}
            dispatchType="subscriber/fetchSearchPublicUser"
            {...list}
        ></TableDataBlock>

    </Card>
}
export default connect(({ loading }) => ({

}))(AnsweringSelected);
